<template>
  <div>
  	<v-Header :item="headerMess"></v-Header>
    <v-Content>
      <!--<v-Swiper :listImg="tops"></v-Swiper>-->
      <mt-swipe :auto="4000">
			  <mt-swipe-item  class="setSwiper" >
			  	 <a>
			  	 	<img src="../../assets/new.jpg"/>
			  	 </a>
			  </mt-swipe-item>
			  <mt-swipe-item  class="setSwiper" >
			  	 <a>
			  	 	<img src="../../assets/chaogu.jpg"/>
			  	 </a>
			  </mt-swipe-item>
			</mt-swipe>
      
      <v-Navigter></v-Navigter>
      <v-BuyA></v-BuyA>
      <v-Recommend></v-Recommend>
      <v-Tab></v-Tab>
    </v-Content>
    <v-Footer></v-Footer>
  </div>
</template>

<script>
import Footer from '@/components/Footer'
import Content from '@/components/ContentCenter'
//import Swiper from '@/components/swiper/Swiper.vue'
import Navigter from '@/components/Navigter'
import BuyA from '@/components/BuyA'
import Header from '@/components/Header'
import Recommend from '@/components/Recommend'
import Tab from '@/components/indexTab/Tab'
import home from '@/api/home/index'
import { Swipe, SwipeItem } from 'mint-ui';
export default {
  data() {
    return {
      swiper: '',
      lists: [],
      headerMess:{
        src:"",
        headerText: '谋略家',
        right: ''
      },
    }
  },
  components: {
    'v-Content': Content,
    'v-Footer': Footer,
    //'v-Swiper': Swiper,
    'v-Recommend':Recommend,
    'v-Navigter': Navigter,
    "v-Header":Header,
    'v-BuyA':BuyA,
    'v-Tab':Tab,
    "mt-swipe":Swipe,
    "mt-swipe-item":SwipeItem,
  },
  methods: {

  },
  beforeRouteEnter(to,from,next){
    document.querySelector('title').innerText='谋略家'
      next()
  },
  mounted() {
		if(true) {
			home.banner().then((data) => {
				if (data.data.code == 200) {
					this.lists=data.data.data;
				}else if(data.data.code==222){
            this.$router.push({path:'/login'})
        } else {
					toast(data.data.message)
				}
			})
		}
  }
}
</script>

<style lang='less' scoped>
@import '../../less/config.less';
.swiper-slide img{
  width: 100%;
  height: 3.2rem;
}
.header{
	padding:0 @p30;
	display: flex;
	justify-content:center;
	align-items: center;
	height:@hwrap;
	color:#fff;
	font-size:.48rem;
	background:#000;
	img,.img{
		width: 30px;
		height: 30px;
	}
}
.setSwiper{
	color: white;
	font-size: 100px;
	img{
		width: 100%;
		height: 100%;
		display: block;
	}
}
</style>

